
#include "ConsoleInput.h"


#include <iostream>
#include <thread>

#include "EditorProcs.h"

using namespace std;

bool b = true;

void InputProc()
{
	while( b )
	{
		char comand[100];
		cin.getline( comand, 100 );
		cout << "got line: " << comand << endl;
		RunCommand( comand );
	}
}

thread input_thread;

void StartConsoleInput(){
	input_thread = thread(InputProc);
}

void StopConsoleInput(){
	b = false;
	input_thread.join();
}


